<?php
include("../inc/conn.inc");
$hover=3;
$c_rs=@mysql_query("select * from catalog where id='".$_GET['id']."'");
$c_row=@mysql_fetch_array($c_rs);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>求购<?=$c_row[cat_name]?>-求购<?=$c_row[cat_name]?>产品-<?=$c_row[cat_name]?>产品求购-最新<?=$c_row[cat_name]?>产品采购信息</title>
<meta name="description" content="求购<?=$c_row[cat_name]?>，求购<?=$c_row[cat_name]?>产品，三帝贸易网产品求购频道提供最新产品采购信息，实时最新更新<?=$c_row[cat_name]?>产品求购信息。" />
<meta name="keywords" content="求购<?=$c_row[cat_name]?>，求购<?=$c_row[cat_name]?>产品，采购<?=$c_row[cat_name]?>，产品求购，采购信息，三帝贸易网" />
<link href="/css/body.css" rel="stylesheet" type="text/css" />
<link href="../css/head.css" rel="stylesheet" type="text/css" />
<link href="/Buy/css/classlist.css" rel="stylesheet" type="text/css" />
<link href="/css/foot.css" rel="stylesheet" type="text/css" />
<script language="javascript">
function list(idstr){
	var name1="subtree"+idstr;
	var name2="img"+idstr;
	var objectobj=document.getElementById(name1);
	var imgobj=document.getElementById(name2);
	
	if(objectobj.style.display=="none"){
		for(i=1;i<100;i++){
			var name3="img"+i;
			var name="subtree"+i;
			var o=document.getElementById(name);
			if(o!=undefined){
				o.style.display="none";
				var image=document.getElementById(name3);
				image.src="/images/ico04.gif";
			}
		}
		objectobj.style.display="";
		imgobj.src="/images/ico03.gif";
	}
	else{
		objectobj.style.display="none";
		imgobj.src="/images/ico04.gif";
	}
}
</script>
</head>
<body>
<?php include("../inc/head_top.php")?>
<?php include("../inc/index_search.php")?>
<?php include("../inc/menu.php");?>
<div id="mian" class="topside6 side">
<div class="title">您所在的位置：<a href="/">首页</a> >> <a href="/buy">求购</a> >> <?=$c_row[cat_name]?></div>
<div class="onl"></div>
</div>
<div id="mian" class="topside20 downside20 sideyellow">
<script type="text/javascript">/*960*90，创建于2011-3-9*/ var cpro_id = 'u403357';</script><script src="http://cpro.baidu.com/cpro/ui/c.js" type="text/javascript"></script>
</div>
<div id="mian" class="topside6">
<div class="rightmain">
<div class="News sideyellow">
<div class="title4"><span><a href="/buy/search.php" target="_blank">更多</a></span>最新求购信息</div>

<div class="rightmain">
  <div class="LBbox">
    <div class="Linfo">
      <ul>
<?php //求购
$rs=@mysql_query("select id,b_title,b_addtime from buy where b_sh=1  order by b_addtime desc,id desc limit 12");
while($row=@mysql_fetch_array($rs)){
?>
<LI class="buy"><span>[<?=date("m/d",strtotime($row[b_addtime]))?>]</span><a href="/buy/<?=$row['id']?>.html" target="_blank"><?=mb_substr($row[b_title],0,15,'utf-8')?><?php if(strlen($row[b_title])>30){echo "...";}?></a></LI>
<?php }?>
      </ul>
    </div>
    <div class="onl"></div>
  </div>
</div>
</div>

<div class="News sideyellow downside20 topside20" align="center">
<script type="text/javascript">/*640*60，创建于2011-9-5*/ var cpro_id = 'u600589';</script><script src="http://cpro.baidu.com/cpro/ui/c.js" type="text/javascript"></script>
</div>

<div class="News sideyellow topside6">
<div class="title4">热点求购</div>
<ul class="imgbox">
<?php
$rs=@mysql_query("select id,b_title,b_info,picture from buy where b_sh=1 and catalog_id1='$_GET[id]'  order by id asc limit 12");
while($row=@mysql_fetch_array($rs)){
?>
<li>
<div class="box1">
<a href="/buy/<?=$row['id']?>.html" target="_blank">
<?php if($row[picture]){?>
<img src="/upfile/<?=$row[picture]?>" alt="<?=$row[b_title]?>" border="0" width="90" height="102" />
<? //=imgstr("http://www.sandib2b.cn/upfile/$row[picture]","90","102")?>
<?php }else{?>
<img src="/images/prono88.gif" width="90" height="102" border="0" />
<?php }?></a>
</div>
<div class="proname b"><a href="/buy/<?=$row['id']?>.html" target="_blank"><?=mb_substr($row[b_title],0,7,'utf-8')?></a></div>
<div class="protxt"><?=mb_substr(strip_tags($row[b_info]),0,28,'utf-8')?></div>
</li>
<?php }?>

<div class="onl"></div>
</ul>
</div>
<div class="News sideyellow topside6">
<div class="title4">最新求购</div>
<ul class="imgbox">
<?php
$rs=@mysql_query("select id,b_title,b_info,picture from buy where b_sh=1 and catalog_id1='$_GET[id]' order by id desc limit 12");
while($row=@mysql_fetch_array($rs)){
?>
<li>
<div class="box1">
<a href="/buy/<?=$row['id']?>.html" target="_blank">
<?php if($row[picture]){?>
<img src="/upfile/<?=$row[picture]?>" alt="<?=$row[b_title]?>" border="0" width="90" height="102" />
<?php }else{?>
<img src="/images/prono88.gif" width="90" height="102" border="0" />
<?php }?></a>
</div>
<div class="proname b"><a href="/buy/<?=$row['id']?>.html" target="_blank"><?=mb_substr($row[b_title],0,7,'utf-8')?></a></div>
<div class="protxt"><?=mb_substr(strip_tags($row[b_info]),0,28,'utf-8')?></div>
</li>
<?php }?>
<div class="onl"></div>
</ul>
</div>
</div>
<div class="leftmain">
  <div class="left sideyellow">
<div class="title3 backyellow size14 b"><?=$c_row[cat_name]?>分类</div>

<div class="Class">
<?php
$rs=@mysql_query("select id,cat_name,b_num from catalog  where cat_id='".$_GET['id']."'");
$n=1;
while($row=@mysql_fetch_array($rs)){
$n_rs=@mysql_query("select count(id) from catalog where cat_id='".$row['id']."'");
$num=@mysql_result($n_rs,0);
@mysql_free_result($n_rs);
?>
<div class="title1 size14">
<?php if($num){?><span><a href="javascript:" onClick="list('<?=$n?>');"><img src="/images/ico04.gif" name="img<?=$n?>" id="img<?=$n?>"  border="0"/></a></span><?php }?><a href="/buy-list/<?=$row['id']?>/1.html" target="_blank"><?=$row[cat_name]?></a> (<?php if($row[b_num]>=0){echo $row[b_num];}else{echo "0";} ?>)
</div>
<?php if($num){?><UL id='subtree<?=$n?>' style="display:none;">
<?php $rs2=@mysql_query("select id,cat_name from catalog where cat_id='".$row['id']."'");
      while($row2=@mysql_fetch_array($rs2)){
?>
<LI><A href="/buy-list/<?=$row2['id']?>/1.html" target="_blank"><?=mb_substr($row2[cat_name],0,5,'utf-8')?></A></LI>
<?php }?>
<div class="onl"></div>
</UL><?php }?>
<div class="onl"></div>
<?php $n++;}?>

</div>

</div>
</div>
<div class="onl"></div>
</div>
<div id="mian" class="topside20 downside20 sideyellow">
<script type="text/javascript">/*960*90，创建于2011-3-9*/ var cpro_id = 'u403357';</script><script src="http://cpro.baidu.com/cpro/ui/c.js" type="text/javascript"></script>
</div>
<?php include("../inc/foot.php");?>
</BODY>
</HTML>

<script type="text/javascript">/*120*270，创建于2011-3-23*/ var cpro_id = 'u419785';</script><script src="http://cpro.baidu.com/cpro/ui/f.js" type="text/javascript"></script>
